import re

if __name__ == '__main__':
    text = "This is some text show in **bold**. That is **content format in bold** too!"

    pattern = r"(\*{2}(.*?)\*{2})"

    # results = re.findall(pattern=pattern,string=text)
    # print(results)

    result = re.sub(pattern=pattern, repl=r"<bold>\2</bold>", string=text)
    print(result)

    regular = re.compile(pattern=pattern)
    result = regular.sub(repl=r"<bold>\2</bold>", string=text)
    print(result)